<?php
class Default_Form_RevivePass extends Zend_Form {

    public function init(){
        
        $this->setName("default");
        
        
        $hash = new Zend_Form_Element_Hidden('hash');                
        
        $newPass = new Zend_Form_Element_Password('newpwd1');
        $newPass->setLabel('Mật khẩu mới (*)')->setRequired(true)->addValidator('NotEmpty')->setAttrib('class','form-control');
        $newPass->setAttrib('style','width:40%');

        $confirmPass = new Zend_Form_Element_Password('newpwd2');
        $confirmPass->setLabel('Nhập lại mật khẩu mới (*)')->setRequired(true)->addValidator('Identical',false,array('token' => 'newpwd1'))->setAttrib('class','form-control');
        $confirmPass->addErrorMessage('Password không khớp! ');
        $confirmPass->setAttrib('style','width:40%');
                               
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('class','form-control')->setAttrib('style','width:20%;margin-top:10px;');
        $submit->setLabel('Đổi mật khẩu');
        $submit->removeDecorator('dtddwrapper')->removeDecorator('HtmlTag')->removeDecorator('Label');

        $this->addElements(array($hash, $newPass,$confirmPass, $submit));
    }

} 
